package net.sunofbeach.blog.services.impl;

import lombok.extern.slf4j.Slf4j;
import net.sunofbeach.blog.utils.EmailSender;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;

@Slf4j
@Service
public class TaskService {

    @Async
    public void sendEmailVerifyCode(String verifyCode, String emailAddress) throws Exception{
        EmailSender.sendRegisterVerifyCode(verifyCode,emailAddress);
    }

    @Async
    public void sendCommentNotify(String id,String notifyContent,String address) throws Exception{
        EmailSender.sendLyNotify(id,notifyContent,address);
    }
}
